-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(tooltip): update default offset to match Spectrum defs #3632
Conversation
Tachometer resultsChrometooltip permalink
Firefoxtooltip permalink
|
@@ -126,7 +131,7 @@ export class Tooltip extends SpectrumElement { | |||
public selfManaged = false; | |||
|
|||
@property({ type: Number }) | |||
public offset = 0; | |||
public offset = this.isMobile.matches ? 5 : 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Spectrum specs never mean "mobile" and "desktop" in this way. They mean it relative to the scale
the UI is delivered in. I've reached out to the team about tokens for this before we do anything custom here. If we need to do so, we likely want this in https://github.com/adobe/spectrum-web-components/blob/main/tools/styles/scale-medium.css and https://github.com/adobe/spectrum-web-components/blob/main/tools/styles/scale-large.css
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I wasn't certain if this was referring to the scale or Mobile in general.
And yes it would make sense to check, if this can be solved by a token or spectrum-var.
Will close this for now.
This PR fixes the default tooltip offset regarding to latest Spectrum defs
Description
Tooltip offset is aligned to latest Spectrum defs, see: https://spectrum.adobe.com/page/tooltip/#Offset
Related issue(s)
#3631
Motivation and context
This change aligns tooltip offset with current application and sync with latest Spectrum definitions
How has this been tested?
manual tested
Screenshots (if appropriate)
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.